package com.zhb.cloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;

import com.google.code.kaptcha.servlet.KaptchaServlet;

@SpringBootApplication
public class MyCloudSsoApplication {
	/***
	 * @Title: servletRegistrationBean
	 * @Description: 使用代码注册Servlet（不需要 @ServletComponentScan注解）
	 * @return: ServletRegistrationBean
	 * @author: zhb
	 * @throws 2016年5月26日上午10:03:14
	 */
	public @Bean ServletRegistrationBean servletRegistrationBean() {
		return new ServletRegistrationBean(new KaptchaServlet(), "/images/kaptcha.jpg");
	}

	public static void main(String[] args) {
		SpringApplication.run(MyCloudSsoApplication.class, args);
	}
}
